<?php
	function showDaohang($daohang,$id)
	{
		$str	= '';
		if(!empty($daohang[$id]))
		{			
			foreach ($daohang[$id] as $key => $var){
				$str.= "<li id='now".$var['id']."' class='".$var['cls']."'><a class='".$var['cls']."' href='".url_for($var['url'])."/' onClick='go_cmdurl(\"".$var['name']."\",this);' target='content3' title='".$var['name']."'>".$var['name']."</a></li>";
			}
		}
		return $str;
	}
	?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="<?php echo $this->webroot.'/theme/admin/js/' ?>menu.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?php echo $this->webroot.'/theme/admin/css/' ?>default.css" type="text/css" />
<title>用户管理后台</title>
<body>
<dl id="header">
	<dd>
		<li>欢迎:<font color="red"><b><?php echo $_SESSION['admin']; ?></b></font>&nbsp;&nbsp;</li>

		<li><a href="<?php echo url_for('admin/logout/') ?>">注销</a>&nbsp;&nbsp;</li>
		<li><a href="javascript:alert('程序维护:陈德华');">版权声明</a>&nbsp;&nbsp;</li>
	</dd>
</dl>
<div id="contents">
	<div class="left">
		<ul class="bigbtu">
			<li id="now01"><a href="javascript:alert('<?php echo date('Y年m月d日H时i分') ?>');"  title="提示时间" target="content3">提示时间</a></li>
			<li id="now02"><a href="javascript:alert('<?php echo date('Y年m月d日H时i分') ?>');"  title="提示时间" target="content3">提示时间</a></li>
		</ul>
		<div class="menu_top"></div>
		
		<div class="menu" id="TabPage3">
			<ul id="TabPage2">
				<?php foreach ($daohang['0'] as $key => $var): ?>
							<li id="left_tab<?php echo $var['id']; ?>" class="<?php echo $var['cls'] ?>" onClick="javascript:border_left('TabPage2','left_tab<?php echo $var['id']; ?>');" title="<?php echo $var['name']; ?>"><?php echo $var['name']; ?></li>
				<?php endforeach; ?>
			</ul>
			
			<!-- 显示菜单 -->
			
			<div id="left_menu_cnt">
				<?php foreach ($daohang['0'] as $key => $v){ ?>
				<ul id="dleft_tab<?php echo $v['id']; ?>" style="display: <?php echo $v['display']; ?>">					
					<?php echo showDaohang($daohang, $v['id']);?>
				</ul>
			<?php } ?>		
			</div>
			<div class="clear"></div>
		</div>
		<div class="menu_end"></div>
	</div>

	<div class="right">
	   <ul id="TabPage1">
	   <li id="Tab1" class="Selected" onClick="javascript:switchTab('TabPage1','Tab1');" title="首页">信息</li>
	   <li id="Tab3" onClick="javascript:switchTab('TabPage1','Tab3');"><span id="dnow99" style="display:block">空白</span></li>	
	   </ul>
		<div id="cnt">
		  <div id="dTab1" class="Box">
		  <iframe src="" name="content1" frameborder="0" scrolling="auto"></iframe>

		  </div>
			<div id="dTab2" class="HackBox Box">
			<iframe src="" name="content2" frameborder="0" scrolling="auto"></iframe>
			</div>
			<div id="dTab3" class="HackBox Box">
			<iframe src="" name="content3" id="content3" frameborder="0" scrolling="auto"></iframe>
			</div>
		</div>

	</div>
	<div class="clear"></div>
</div>
</body>
</html>